package com.example.dessert.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;

import java.util.Date;

/**
 * @ClassName: Favorite
 * @Description: 用户收藏
 * @Author li
 * @Date 2022/1/14
 * @Version 1.0
 */
public class Favorite {

    private Long id;
    private Long userId;
    private Long productId;

    @TableField(exist = false)
    private String productName;
    @TableField(exist = false)
    private String productPicture;
    @TableField(exist = false)
    private Integer productPrice;

    //插入时自动填充
    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;

    public Long getId() {
        return id;
    }


    public String getProductName() {
        return productName;
    }

    public String getProductPicture() {
        return productPicture;
    }

    public Integer getProductPrice() {
        return productPrice;
    }

    public Favorite setUserId(Long userId) {
        this.userId = userId;
        return this;
    }

    public Favorite setProductId(Long productId) {
        this.productId = productId;
        return this;
    }

}
